home *** CD-ROM | disk | FTP | other *** search
- 1000 rem string-zahl-w. mit nachkomma
- 1010 t$="12.34":z=0:a=0.1:k$="."
- 1020 rem komma suchen
- 1030 for i=1tolen(t$)
- 1040 ifk$<>left$(right$(t$,i),1)thennexti
- 1050 k=i
- 1060 rem nachkommastelle berechnen
- 1070 for i=1tok-1
- 1080 t=asc(left$(right$(t$,i),1))-48
- 1090 z=z+t*a:a=a/10
- 1100 nexti
- 1110 rem vorkommatelle berechnen
- 1120 a=1
- 1130 for i=k+1 to len(t$)
- 1140 t=asc(left$(right$(t$,i),1))-48
- 1150 z=z+t*a:a=a*10
- 1160 next i
- 1170 print z
-